package com.bsoft.gol.editor.editor;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@Entity(name="EditorQuestionnaire")
@Table(name = "editor_questionnaire", catalog = "")
public class EditorQuestionnaire {

    /**
     * <pre>
     * 表单id
     * 表字段 : editor_questionnaire.questionnaire_id
     * </pre>
     *
     */
    private String questionnaireId;

    /**
     * <pre>
     * 表单名称
     * 表字段 : editor_questionnaire.questionnaire_name
     * </pre>
     *
     */
    private String questionnaireName;

    /**
     * <pre>
     * 表单代码
     * 表字段 : editor_questionnaire.questionnaire_code
     * </pre>
     *
     */
    private String questionnaireCode;

    /**
     * <pre>
     * 版本号
     * 表字段 : editor_questionnaire.questionnaire_version
     * </pre>
     *
     */
    private BigDecimal questionnaireVersion;

    /**
     * <pre>
     * 修改时间
     * 表字段 : editor_questionnaire.questionnaire_date
     * </pre>
     *
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date questionnaireDate;

    /**
     * <pre>
     * 状态
     * 表字段 : editor_questionnaire.questionnaire_state
     * </pre>
     *
     */
    private Byte questionnaireState;

    /**
     * <pre>
     * 是否最新版本
     * 表字段 : editor_questionnaire.questionnaire_flag
     * </pre>
     *
     */
    private Byte questionnaireFlag;

    /**
     * <pre>
     * 部门id
     * 表字段 : editor_questionnaire.dept_id
     * </pre>
     *
     */
    private String deptId;

    /**
     * <pre>
     * 部门名称
     * 表字段 : editor_questionnaire.dept_name
     * </pre>
     *
     */
    private String deptName;

    /**
     * <pre>
     * 创建人
     * 表字段 : editor_questionnaire.create_id
     * </pre>
     *
     */
    private String createId;

    /**
     * <pre>
     * 创建时间
     * 表字段 : editor_questionnaire.create_time
     * </pre>
     *
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * <pre>
     * 机构id
     * 表字段 : editor_questionnaire.org_id
     * </pre>
     *
     */
    private String orgId;

    /**
     * <pre>
     * 机构名称
     * 表字段 : editor_questionnaire.org_name
     * </pre>
     *
     */
    private String orgName;
    /**
     * <pre>
     * 机构id
     * 表字段 : editor_questionnaire.update_id
     * </pre>
     *
     */
    private String updateId;

    /**
     * <pre>
     * 机构名称
     * 表字段 : editor_questionnaire.update_name
     * </pre>
     *
     */
    private String updateIdName;

    /**
     * <pre>
     * 问卷类型
     * 表字段 : editor_questionnaire.questionnaire_type
     * </pre>
     *
     */
    private Byte questionnaireType;

    /**
     * <pre>
     * 有效时间
     * 表字段 : editor_questionnaire.questionnaire_valid_time
     * </pre>
     *
     */
    private Integer effectiveTime;

    private Integer ifToday;

    private String questionnaireWithTitle;

    private Integer ifReuse;

    private String questionnaireMould;

    private String loginUserId;

    private String deleteFlag;

    /**
     * 是否显示副标题 1是  2否
     */
    private Integer hasSubtitle;
    /**
     * 1.表示机构权限,2表示科室权限,3表示人拥有的权限
     */
    private String type;
    /**
     * 表单标题字号
     */
    private String formTitleWordSize = "32px";
    /**
     * 题干字号
     */
    private String questionTagWordSize = "18px" ;
    /**
     * 选项字号
     */
    private String optionsWordSize = "18px" ;
    /**
     * 隐藏标题
     */
    private String hidTitle = "0";
    /**
     * 隐藏序号
     */
    private String hidSerialNum  = "0";
    /**
     * 隐藏进度条
     */
    private String hidProgressBar = "0";
    /**
     * 处理方式:processMode (1.不做任何处理,2.显示自定义文案,3.按得分显示文案,默认是1)
     */
    private String processMode = "1";
    /**
     * 提交后可再次编辑: ifEditorAgain (1是0否,默认是0)
     */
    private String ifEditorAgain ="0";


    @Id
    @Column(name = "questionnaire_id")
    public String getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(String questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    @Basic
    @Column(name = "questionnaire_name")
    public String getQuestionnaireName() {
        return questionnaireName;
    }

    public void setQuestionnaireName(String questionnaireName) {
        this.questionnaireName = questionnaireName;
    }

    @Basic
    @Column(name = "questionnaire_code")
    public String getQuestionnaireCode() {
        return questionnaireCode;
    }

    public void setQuestionnaireCode(String questionnaireCode) {
        this.questionnaireCode = questionnaireCode;
    }

    @Basic
    @Column(name = "questionnaire_version")
    public BigDecimal getQuestionnaireVersion() {
        return questionnaireVersion;
    }

    public void setQuestionnaireVersion(BigDecimal questionnaireVersion) {
        this.questionnaireVersion = questionnaireVersion;
    }

    @Basic
    @Column(name = "questionnaire_date")

    public Date getQuestionnaireDate() {
        return questionnaireDate;
    }

    public void setQuestionnaireDate(Date questionnaireDate) {
        this.questionnaireDate = questionnaireDate;
    }

    @Basic
    @Column(name = "questionnaire_state")
    public Byte getQuestionnaireState() {
        return questionnaireState;
    }

    public void setQuestionnaireState(Byte questionnaireState) {
        this.questionnaireState = questionnaireState;
    }

    @Basic
    @Column(name = "questionnaire_flag")
    public Byte getQuestionnaireFlag() {
        return questionnaireFlag;
    }

    public void setQuestionnaireFlag(Byte questionnaireFlag) {
        this.questionnaireFlag = questionnaireFlag;
    }

    @Basic
    @Column(name = "dept_id")
    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    @Basic
    @Column(name = "dept_name")
    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    @Basic
    @Column(name = "create_id")
    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    @Basic
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "update_id")
    public String getUpdateId() {
        return updateId;
    }

    public void setUpdateId(String updateId) {
        this.updateId = updateId;
    }

    @Basic
    @Column(name = "update_name")
    public String getUpdateIdName() {
        return updateIdName;
    }

    public void setUpdateIdName(String updateIdName) {
        this.updateIdName = updateIdName;
    }

    @Basic
    @Column(name = "questionnaire_type")
    public Byte getQuestionnaireType() {
        return questionnaireType;
    }

    public void setQuestionnaireType(Byte questionnaireType) {
        this.questionnaireType = questionnaireType;
    }


    @Basic
    @Column(name = "effective_time")
    public Integer getEffectiveTime() {
        return effectiveTime;
    }

    public void setEffectiveTime(Integer effectiveTime) {
        this.effectiveTime = effectiveTime;
    }



    @Basic
    @Column(name = "if_today")
    public Integer getIfToday() {
        return ifToday;
    }

    public void setIfToday(Integer ifToday) {
        this.ifToday = ifToday;
    }

    @Basic
    @Column(name = "with_title")
    public String getQuestionnaireWithTitle() {
        return questionnaireWithTitle;
    }

    public void setQuestionnaireWithTitle(String questionnaireWithTitle) {
        this.questionnaireWithTitle = questionnaireWithTitle;
    }

    @Basic
    @Column(name = "if_reuse")
    public Integer getIfReuse() {
        return ifReuse;
    }

    public void setIfReuse(Integer ifReuse) {
        this.ifReuse = ifReuse;
    }


    @Basic
    @Column(name = "questionnaire_mould")
    public String getQuestionnaireMould() {
        return questionnaireMould;
    }

    public void setQuestionnaireMould(String questionnaireMould) {
        this.questionnaireMould = questionnaireMould;
    }


    @Basic
    @Column(name = "delete_flag")
    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }


    @Basic
    @Column(name = "has_subtitle")
    public Integer getHasSubtitle() {
        return hasSubtitle;
    }

    public void setHasSubtitle(Integer hasSubtitle) {
        this.hasSubtitle = hasSubtitle;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "form_title_word_size")
    public String getFormTitleWordSize() {
        return formTitleWordSize;
    }

    public void setFormTitleWordSize(String formTitleWordSize) {
        this.formTitleWordSize = formTitleWordSize;
    }

    @Basic
    @Column(name = "question_tag_word_size")
    public String getQuestionTagWordSize() {
        return questionTagWordSize;
    }

    public void setQuestionTagWordSize(String questionTagWordSize) {
        this.questionTagWordSize = questionTagWordSize;
    }

    @Basic
    @Column(name = "options_word_size")
    public String getOptionsWordSize() {
        return optionsWordSize;
    }

    public void setOptionsWordSize(String optionsWordSize) {
        this.optionsWordSize = optionsWordSize;
    }


    @Basic
    @Column(name = "hid_title")
    public String getHidTitle() {
        return hidTitle;
    }

    public void setHidTitle(String hidTitle) {
        this.hidTitle = hidTitle;
    }

    @Basic
    @Column(name = "hid_serial_num")
    public String getHidSerialNum() {
        return hidSerialNum;
    }

    public void setHidSerialNum(String hidSerialNum) {
        this.hidSerialNum = hidSerialNum;
    }

    @Basic
    @Column(name = "hid_progress_bar")
    public String getHidProgressBar() {
        return hidProgressBar;
    }

    public void setHidProgressBar(String hidProgressBar) {
        this.hidProgressBar = hidProgressBar;
    }

    @Basic
    @Column(name = "process_mode")
    public String getProcessMode() {
        return processMode;
    }

    public void setProcessMode(String processMode) {
        this.processMode = processMode;
    }

    @Basic
    @Column(name = "if_editor_again")
    public String getIfEditorAgain() {
        return ifEditorAgain;
    }

    public void setIfEditorAgain(String ifEditorAgain) {
        this.ifEditorAgain = ifEditorAgain;
    }

    @Transient
    public String getLoginUserId() {
        return loginUserId;
    }

    public void setLoginUserId(String loginUserId) {
        this.loginUserId = loginUserId;
    }
}
